package tech.aistar.day01;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/18 4:11 下午
 */
public class ParamTransferTest {
    public static void main(String[] args) {
        //对象类型
        StringBuilder x = new StringBuilder("A");
        StringBuilder y = new StringBuilder("B");

        change(x,y);

        System.out.println("main-x:"+x);//A
        System.out.println("main-y:"+y);//BB

    }

    private static void change(StringBuilder x, StringBuilder y) {
        x = y;
        y.append("B");
        System.out.println("change-x:"+x);//BB
        System.out.println("change-y:"+y);//BB
    }
}
